package demo10;

import java.util.Comparator;

public class NameComparator implements Comparator<Studnet> {

    @Override
    public int compare(Studnet o1,Studnet o2){
        return o1.name.compareTo(o2.name);
    }
}
